package com.telkomsigma.hibernate.services.player;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.telkomsigma.hibernate.common.PaginatedResult;
import com.telkomsigma.hibernate.persistence.player.dao.PlayerDaoImpl;
import com.telkomsigma.hibernate.persistence.player.entity.Player;

@Service("playerService")
public class PlayerServiceDao implements PlayerService{
	@Autowired
	PlayerDaoImpl playerDao;
	
	public void setPlayerDao(PlayerDaoImpl playerDao) {
		this.playerDao = playerDao;
	}
	
	@Override
	@Transactional(readOnly = false)
	public Player insert(Player transientInstance) {
		return playerDao.insert(transientInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Player update(Player detachedInstance) {
		return playerDao.update(detachedInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean remove(Player persistentInstance) {
		return playerDao.remove(persistentInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean removeList(List<Player> list) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Player findById(String id) {
		return playerDao.findById(id);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Player> findByProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {		
		return playerDao.findByProperty(propertyName, value, rowStartIdxAndCount);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Player> findAll(int... rowStartIdxAndCount) {
		return playerDao.findAll(rowStartIdxAndCount);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Player> findLikeProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Player> findLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Player> findByMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeMapOfProperties(Map<String, Object> propertiesMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByMapOfProperties(Map<String, Object> propertiesMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Player> paginateLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Player> paginateAll(int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Player> paginateByMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}
}
